i = 0

while i<3:
    user_name = str(input("用户名:"))
    pwd = str(input("密码:"))
    if user_name == "zdx" and pwd == "123":
        print("正确...")
        break
    else:
        if i < 2:
            print("你还有%s次机会" % (2 - i))
        i += 1

if i == 3:
    print("密码错误超过三次账号锁定！")